.class Lcom/nemustech/regina/XMLRecord;
.super Ljava/lang/Object;
.source "ReginaCheckForUpdate.java"

# interfaces
.implements Ljava/io/Serializable;


# instance fields
.field private appName:Ljava/lang/String;

.field private appid:Ljava/lang/String;

.field private changeLog:Ljava/lang/String;

.field private currentVersion:I

.field private date:Ljava/lang/String;

.field private packageName:Ljava/lang/String;

.field private resetList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private serverVersion:I

.field private targeted:Z

.field private url:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 514
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 510
    iput-boolean v0, p0, Lcom/nemustech/regina/XMLRecord;->targeted:Z

    .line 516
    iput-boolean v0, p0, Lcom/nemustech/regina/XMLRecord;->targeted:Z

    .line 517
    return-void
.end method

.method static convertCodeToName(I)Ljava/lang/String;
    .locals 5
    .parameter "versionCode"

    .prologue
    .line 600
    if-eqz p0, :cond_0

    .line 602
    div-int/lit16 v3, p0, 0x2710

    invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v0

    .line 605
    .local v0, major:Ljava/lang/String;
    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    mul-int/lit16 v3, v3, 0x2710

    sub-int/2addr p0, v3

    .line 606
    div-int/lit8 v3, p0, 0x64

    invoke-static {v3}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v1

    .line 609
    .local v1, minor:Ljava/lang/String;
    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    mul-int/lit8 v3, v3, 0x64

    sub-int/2addr p0, v3

    .line 610
    invoke-static {p0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v2

    .line 612
    .local v2, point:Ljava/lang/String;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 614
    .end local v0           #major:Ljava/lang/String;
    .end local v1           #minor:Ljava/lang/String;
    .end local v2           #point:Ljava/lang/String;
    :goto_0
    return-object v3

    :cond_0
    const-string v3, "--.--.--"

    goto :goto_0
.end method


# virtual methods
.method public addResetItem(Ljava/lang/String;)V
    .locals 2
    .parameter "resetPath"

    .prologue
    .line 578
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->resetList:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    .line 579
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/XMLRecord;->resetList:Ljava/util/ArrayList;

    .line 583
    :goto_0
    return-void

    .line 581
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->resetList:Ljava/util/ArrayList;

    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0
.end method

.method public canUpdated()Z
    .locals 2

    .prologue
    .line 592
    iget v0, p0, Lcom/nemustech/regina/XMLRecord;->serverVersion:I

    iget v1, p0, Lcom/nemustech/regina/XMLRecord;->currentVersion:I

    if-le v0, v1, :cond_0

    .line 593
    const/4 v0, 0x1

    .line 595
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getAppName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 532
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->appName:Ljava/lang/String;

    return-object v0
.end method

.method public getAppid()Ljava/lang/String;
    .locals 1

    .prologue
    .line 585
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->appid:Ljava/lang/String;

    return-object v0
.end method

.method public getChangeLog()Ljava/lang/String;
    .locals 1

    .prologue
    .line 526
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->changeLog:Ljava/lang/String;

    return-object v0
.end method

.method public getCurrentVersionCode()I
    .locals 1

    .prologue
    .line 554
    iget v0, p0, Lcom/nemustech/regina/XMLRecord;->currentVersion:I

    return v0
.end method

.method public getCurrentVersionName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 557
    iget v0, p0, Lcom/nemustech/regina/XMLRecord;->currentVersion:I

    invoke-static {v0}, Lcom/nemustech/regina/XMLRecord;->convertCodeToName(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getDate()Ljava/lang/String;
    .locals 1

    .prologue
    .line 563
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->date:Ljava/lang/String;

    return-object v0
.end method

.method public getPackageName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 538
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->packageName:Ljava/lang/String;

    return-object v0
.end method

.method public getResetList()Ljava/util/ArrayList;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 575
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->resetList:Ljava/util/ArrayList;

    return-object v0
.end method

.method public getServerVersionCode()I
    .locals 1

    .prologue
    .line 544
    iget v0, p0, Lcom/nemustech/regina/XMLRecord;->serverVersion:I

    return v0
.end method

.method public getServerVersionName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 547
    iget v0, p0, Lcom/nemustech/regina/XMLRecord;->serverVersion:I

    invoke-static {v0}, Lcom/nemustech/regina/XMLRecord;->convertCodeToName(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getUrl()Ljava/lang/String;
    .locals 1

    .prologue
    .line 569
    iget-object v0, p0, Lcom/nemustech/regina/XMLRecord;->url:Ljava/lang/String;

    return-object v0
.end method

.method public isTargeted()Z
    .locals 1

    .prologue
    .line 520
    iget-boolean v0, p0, Lcom/nemustech/regina/XMLRecord;->targeted:Z

    return v0
.end method

.method public setAppName(Ljava/lang/String;)V
    .locals 1
    .parameter "appName"

    .prologue
    .line 535
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/XMLRecord;->appName:Ljava/lang/String;

    .line 536
    return-void
.end method

.method public setAppid(Ljava/lang/String;)V
    .locals 0
    .parameter "appid"

    .prologue
    .line 588
    iput-object p1, p0, Lcom/nemustech/regina/XMLRecord;->appid:Ljava/lang/String;

    .line 589
    return-void
.end method

.method public setChangeLog(Ljava/lang/String;)V
    .locals 0
    .parameter "changeLog"

    .prologue
    .line 529
    iput-object p1, p0, Lcom/nemustech/regina/XMLRecord;->changeLog:Ljava/lang/String;

    .line 530
    return-void
.end method

.method public setCurrentVersion(I)V
    .locals 0
    .parameter "currentVersion"

    .prologue
    .line 560
    iput p1, p0, Lcom/nemustech/regina/XMLRecord;->currentVersion:I

    .line 561
    return-void
.end method

.method public setDate(Ljava/lang/String;)V
    .locals 1
    .parameter "date"

    .prologue
    .line 566
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/XMLRecord;->date:Ljava/lang/String;

    .line 567
    return-void
.end method

.method public setPackageName(Ljava/lang/String;)V
    .locals 1
    .parameter "packageName"

    .prologue
    .line 541
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/XMLRecord;->packageName:Ljava/lang/String;

    .line 542
    return-void
.end method

.method public setServerVersion(Ljava/lang/String;)V
    .locals 2
    .parameter "serverVersion"

    .prologue
    .line 550
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    .line 551
    .local v0, intVersion:I
    iput v0, p0, Lcom/nemustech/regina/XMLRecord;->serverVersion:I

    .line 552
    return-void
.end method

.method public setTargeted(Z)V
    .locals 0
    .parameter "targeted"

    .prologue
    .line 523
    iput-boolean p1, p0, Lcom/nemustech/regina/XMLRecord;->targeted:Z

    .line 524
    return-void
.end method

.method public setUrl(Ljava/lang/String;)V
    .locals 1
    .parameter "url"

    .prologue
    .line 572
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/XMLRecord;->url:Ljava/lang/String;

    .line 573
    return-void
.end method
